#!/bin/bash

buildRoot=/build
installDstRoot=/usr/local

srcRoot=$buildRoot/src
buildTmpRoot=$buildRoot/tmp
pkgRoot=$buildRoot/pkg
scriptRoot=$buildRoot/script

$scriptRoot/pre_build.sh

cd $installDstRoot
mkdir -p $buildTmpRoot
cd $buildTmpRoot

tar zxvf $srcRoot/samba-4.4.16.tar.gz
cd samba-4.4.16

./configure --prefix=$installDstRoot/samba-4.4.16
make
make install

cd $installDstRoot
tar zcvf samba-4.4.16.tar.gz samba-4.4.16
cp samba-4.4.16.tar.gz $pkgRoot
